package com.sxjh.entity.param;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sxjh.entity.PageEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.LinkedHashSet;

@Data
@EqualsAndHashCode(callSuper = false)
public class ReportsListParam extends PageEntity {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty("车号")
    private String vehNumber;

    @ApiModelProperty(value = "装货地id")
    private Integer locationUpId;

    @ApiModelProperty(value = "装货点所属工厂id")
    private Integer locationUpFactoryId;

    @ApiModelProperty(value = "装货点所属车间id")
    private Integer locationUpWorkshopId;

    @ApiModelProperty(value = "卸货地id")
    private Integer locationDownId;

    @ApiModelProperty(value = "卸货点所属工厂id")
    private Integer locationDownFactoryId;

    @ApiModelProperty(value = "卸货点所属车间id")
    private Integer locationDownWorkshopId;

    @ApiModelProperty(value = "物料ID")
    private Integer materialId;

    @ApiModelProperty("时间方式:1,出厂时间;2入场时间,默认出厂时间")
    private Integer type = 1;

    @ApiModelProperty("排序类型：1.物料名称, 2.车数, 3.毛重, 4.皮重, 5.净重, 6.装车点, 7.卸车点, 8.装车点所属工厂, 9.装车点所属车间, 10.卸车点所属工厂, 11.卸车点所属车间, 12.复磅时间")
    private Integer sortType;

    @ApiModelProperty("升降序类型：1.升序， 2.倒序")
    private Integer orderType;

    @ApiModelProperty(value = "序号")
    @ExcelProperty(value = "序号")
    @ColumnWidth(10)
    private String index;

    @ExcelProperty(value = "复磅时间")
    @ColumnWidth(45)
    @ApiModelProperty("时间")
    private LocalDateTime grossAt;

    /*@ApiModelProperty(value = "更新时间 -- 完成时间")
    @ExcelProperty(value = "时间")
    @ColumnWidth(30)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private String updatedAt;*/

    @ApiModelProperty(value = "开始时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "结束时间")
    private LocalDateTime endAt;

    @ApiModelProperty(value = "装货地名称")
    @ExcelProperty(value = "装车点")
    @ColumnWidth(45)
    private String locationUpName;

    @ApiModelProperty(value = "卸货地名称")
    @ExcelProperty(value = "卸车点")
    @ColumnWidth(45)
    private String locationDownName;

    @ApiModelProperty(value = "装货点所属工厂名称")
    @ExcelProperty(value = "装货点所属工厂")
    @ColumnWidth(45)
    private String locationUpFactoryName;

    @ApiModelProperty(value = "装货点所属车间名称")
    @ExcelProperty(value = "装货点所属车间")
    @ColumnWidth(45)
    private String locationUpWorkshopName;

    @ApiModelProperty(value = "卸货点所属工厂名称")
    @ExcelProperty(value = "卸货点所属工厂")
    @ColumnWidth(45)
    private String locationDownFactoryName;

    @ApiModelProperty(value = "卸货点所属车间名称")
    @ExcelProperty(value = "卸货点所属车间")
    @ColumnWidth(45)
    private String locationDownWorkshopName;

    @ApiModelProperty("物料名称")
    @ExcelProperty(value = "物料")
    @ColumnWidth(45)
    private String materialName;

    @ApiModelProperty(value = "车数")
    @ExcelProperty(value = "物料车辆")
    @ColumnWidth(20)
    private Integer vehNumberCount;

    @ApiModelProperty(value = "毛重数")
    @ExcelProperty(value = "毛重/吨")
    @ColumnWidth(30)
    private Double grossCount;

    @ApiModelProperty(value = "皮重数")
    @ExcelProperty(value = "皮重/吨")
    @ColumnWidth(30)
    private Double tareCount;

    @ApiModelProperty(value = "净重数")
    @ExcelProperty(value = "净重/吨")
    @ColumnWidth(30)
    private Double netCount;

    @ApiModelProperty(value = "派车单号")
    private String orderNo;

    @ApiModelProperty(value = "计划单no")
    private String plannedOrderNo;

    @ApiModelProperty(value = "表头字段")
    private LinkedHashSet<String> headerFields;

    @ApiModelProperty(value = "导出标识：1.导出Excel，2.导出pdf")
    private Integer flag = 1;

}